<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%--<x:parse xml="${param.xmlstr}" var="xmlData" />--%>
<div class="t_bar">
    <%--<span class="color_red">*</span>--%>
    项目基本情况
</div>
<c:set var="nature_value">
    <x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" />
</c:set>
<table class="t_css" id="basic_tab" width="100%" border="0" cellpadding="0" cellspacing="1">
    <col style="width: 25%" />
    <col style="width: 25%" />
    <col style="width: 25%" />
    <col style="width: 25%" />
    <tr class="li_1">
        <td align="right"><span class="color_red">*</span>项目名称：</td>
        <td colspan="4">
            <input type="text" name="proposal/zh_title" id="project_name" style="width: 98%;" class="required" maxlength="100" value="<x:out select="$xmlData/data/proposal/zh_title"/>" label="项目名称">
        </td>
    </tr>
    <tr>
        <td align="right"><span class="color_red">*</span>归口管理部门：</td>
        <td>
            <c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>
            <cpt:tree key="recomend_org_gk" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}"  id="recomend_org" showPattern="all" shieldPattern="0"
                      topCheckbox="false" onClick="initTreeValueExt" />
            <input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value" class="required" value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门">
            <input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">
        </td>
        <%--<td colspan="3>--%>
            <%--<c:set var="recomend_org">{'id':'<x:out select="$xmlData/data/proposal/recomend_org_value" />','name':'<x:out select="$xmlData/data/proposal/recomend_org_name" />'}</c:set>--%>
            <%--<cpt:tree key="recommended_org" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${recomend_org}" width=""  label="归口管理部门"--%>
                      <%--id="recomend_org" onlyChooseLeaf="false"  showPattern="all" shieldPattern="0" topCheckbox="true" onClick="initTreeValueExt" />--%>
            <%--<input type="hidden" id="recomend_org_value" name="proposal/recomend_org_value"  class="required"  value="<x:out select="$xmlData/data/proposal/recomend_org_value" />" label="归口管理部门" >--%>
            <%--<input type="hidden" name="proposal/recomend_org_name" value="<x:out select="$xmlData/data/proposal/recomend_org_name" />">--%>
        <%--</td>--%>
        <td align="right"><span class="color_red">*</span>申报日期：</td>
        <td>
            <c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
            <cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date" label="申报日期"></cpt:date>
        </td>

    </tr>
    <tr>
        <td  align="right"><span class="color_red">*</span>所属技术领域：</td>
        <td  colspan="4" align="left" >
            <%--<c:set var="techarea"><x:out select="$xmlData/data/organization/techarea_value" /></c:set>--%>
            <%--<cpt:select id="techarea" key="zyy_domain" onChange="initControlValue(this.id)" value="${techarea}" className="hn_iuput_kuang100"></cpt:select>--%>
            <%--<input type="hidden" name="organization/techarea_value" class="required" value="<x:out select="$xmlData/data/organization/techarea_value" />"  label="所属技术领域"/>--%>
            <%--<input type="hidden" name="organization/techarea_name" value="<x:out select="$xmlData/data/organization/techarea_name" />"/>--%>
                <%-- <input type="hidden" name="proposal/need_approve" value="${need_approve}"> --%>
                <c:set var="applicant_subject_value"><x:out select="$xmlData/data/proposal/applicant_subject_value" /></c:set>
                <c:set var="appl_sub_params">
                    {'grant_code':'<x:out select="$xmlData/data/proposal/sub_grant_code" />','stat_year':'${statYear}'}
                </c:set>
                <input name="proposal/applicant_subject_value" type="hidden" value="<x:out select="$xmlData/data/proposal/applicant_subject_value" />" class="required " label="所属技术领域"/>
                <input name="proposal/applicant_subject_name" type="hidden" value="<x:out select="$xmlData/data/proposal/applicant_subject_name" />" />
                <cpt:select style="width: 68%;" id="applicant_subject" key="applicant_subject" className="selectWidth2" onChange="initControlValue('applicant_subject')" value="${applicant_subject_value}" sqlParamVal="${appl_sub_params}"></cpt:select>
        </td>
    </tr>
<%--    <tr>
        <td align="right"><span class="color_red">*</span>项目实施地点：</td>
        <td colspan="4">
            <input type="text" name="proposal/build_area" id="build_area" style="width: 98%;" class="required" maxlength="100" value="<x:out select="$xmlData/data/proposal/build_area"/>" label="项目实施地点">
        </td>
    </tr>--%>
    <%--<tr>--%>
        <%--<td align="right"><span class="color_red">*</span>内设学院或机构<br/>（没有可填无）：</td>--%>
        <%--<td colspan="4">--%>
            <%--<input type="text"  name="proposal/built_institute" class="required" onchange="synchronizationAmount1()"  id="built_institute" style="text-align: left;width: 82%;" maxlength="30"--%>
                   <%--value="<x:out select="$xmlData/data/proposal/built_institute"/>" label="内设学院或机构" >--%>
        <%--</td>--%>
    <%--</tr>--%>

    <c:if test="${fn:substring(nature_value,0,1) eq 'A'}">
        <tr>
            <td align="right">企业类型
                （是否中小企业参考工信部联企业〔2011〕300号关于印发中小企业划型标准规定的通知 ）：</td>
            <td colspan="3" align="center">
                <input type="checkbox" name="enterprise_scale" id="isEnterpriseScale" value="中小企业" style="margin-left: 10%" onClick="initControlValue(this.id);removeDisabled();">中小企业
                （<input type="checkbox" name="technology_enterprise" id="technologyEnterprise" disabled="disabled" value="科技型中小企业" onClick="initControlValue(this.id);" >科技型中小企业）
                <input type="checkbox" name="enterprise_scale" id="noEnterpriseScale" value="民营企业" style="margin-left: 10%" onClick="initControlValue(this.id);">民营企业
                <input type="hidden" id="enterprise_scale_value" name="proposal/enterprise_scale_value"    value="<x:out select="$xmlData/data/proposal/enterprise_scale_value" />" label="企业类型">
                <input type="hidden" id="technology_enterprise_value" name="proposal/technology_enterprise_value" value="<x:out select="$xmlData/data/proposal/technology_enterprise_value" />">
            </td>
        </tr>

    </c:if>
    <tr>
        <td align="right"><span class="color_red">*</span>是否安徽省十大新兴产业：</td>
        <td colspan="3" align="center">
            <c:set var="emerging_enterprises_value"><x:out select="$xmlData/data/proposal/emerging_enterprises_value" /></c:set>
            <cpt:checkbox key="no_yes" name="emerging_enterprises"  width="100px"  repeatColumn="4" value="${emerging_enterprises_value }"  onClick="emerging_enterprises" tagType="radio" ></cpt:checkbox>
            <input type="hidden" id="emerging_enterprises_value" name="proposal/emerging_enterprises_value" class="required" value="${emerging_enterprises_value}" label="是否安徽省十大新兴产业">
            <input type="hidden" name="proposal/emerging_enterprises_name" value="<x:out select="$xmlData/data/proposal/emerging_enterprises_name" />">

            <div id="emerging_industries_value_div" style="display: none">
                <c:set var="emerging_industries_value"><x:out select="$xmlData/data/proposal/emerging_industries_value" /></c:set>
                <cpt:checkbox key="emerging_industries" name="emerging_industries"  width="100px"  repeatColumn="4" value="${emerging_industries_value }" ></cpt:checkbox>
                <input type="hidden" id="emerging_industries_value" name="proposal/emerging_industries_value" class="required" value="${emerging_industries_value}" label="是否安徽省十大新兴产业-->安徽省十大新兴产业">
                <input type="hidden" name="proposal/emerging_industries_name"  value="<x:out select="$xmlData/data/proposal/emerging_industries_name" />">
            </div>
        </td>
    </tr>
    <tr>
        <td align="right"><span class="color_red">*</span>是否产学研合作项目：</td>
        <td colspan="3" align="center" class="li_2">
            <c:set var="industry_university_value"><x:out select="$xmlData/data/proposal/industry_university_value" /></c:set>
            <cpt:checkbox key="no_yes" name="industry_university"  width="70px"  repeatColumn="4" value="${industry_university_value }"   tagType="radio" ></cpt:checkbox>
            <input type="hidden" id="industry_university_value" name="proposal/industry_university_value" class="required" value="${industry_university_value}" label="是否产学研合作项目">
            <input type="hidden" name="proposal/industry_university_name" value="<x:out select="$xmlData/data/proposal/industry_university_name" />">
        </td>
    </tr>
    <c:if test="${fn:substring(nature_value,0,1) eq 'A' || fn:substring(nature_value,0,1) eq 'B' }">
    <tr>
        <td align="right"><span class="color_red">*</span>是否规模以上工业企业：</td>
        <td colspan="4" align="center">
            <c:set var="industrial_enterprise_value"><x:out select="$xmlData/data/proposal/industrial_enterprise_value" /></c:set>
            <cpt:checkbox key="no_yes" name="industrial_enterprise"  width="70px"  repeatColumn="4" value="${industrial_enterprise_value }"  onClick="industrial_enterprise" tagType="radio" ></cpt:checkbox>
            <input type="hidden" id="industrial_enterprise_value" name="proposal/industrial_enterprise_value" class="required" value="${industrial_enterprise_value}" label="是否规模以上工业企业">
            <input type="hidden" name="proposal/industrial_enterprise_name" value="<x:out select="$xmlData/data/proposal/industrial_enterprise_name" />">
        </td>
    </tr>
</c:if>

    <c:if test="${fn:substring(nature_value,0,1) != 'A' && fn:substring(nature_value,0,1) != 'B'}">
        <tr>
            <td align="right">是否规模以上工业企业：</td>
            <td colspan="4" align="center">
                <c:set var="industrial_enterprise_value"><x:out select="$xmlData/data/proposal/industrial_enterprise_value" /></c:set>
                <cpt:checkbox key="no_yes" name="industrial_enterprise"  width="70px"  repeatColumn="4" value="${industrial_enterprise_value }"  onClick="industrial_enterprise" tagType="radio" ></cpt:checkbox>
                <input type="hidden" id="industrial_enterprise_value" name="proposal/industrial_enterprise_value" class="" value="${industrial_enterprise_value}" label="是否规模以上工业企业">
                <input type="hidden" name="proposal/industrial_enterprise_name" value="<x:out select="$xmlData/data/proposal/industrial_enterprise_name" />">
            </td>
        </tr>
    </c:if>


    <tr>
        <td align="right">项目起止时间：</td>
        <td colspan="3" align="">
            <span name="proposal/start_date">${param.pro_start_date}</span>&nbsp;&nbsp;&nbsp; 至 &nbsp;&nbsp;&nbsp;<span name="proposal/end_date">${param.pro_end_date}</span>
        </td>
    </tr>
    <tr>
        <td align="right"><span class="color_red">*</span>项目联系人姓名：</td>
        <td>
            <input  type="text" label="项目联系人姓名" name="proposal/contact_psn_cname" class="input_css required" maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
        </td>
        <input type="hidden" name="proposal/contact_psn_tel" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_tel"/>"/>
        <input type="hidden" name="proposal/contact_psn_email" value="<x:out select="$xmlData/data/organization_persons/organization_person[@psn_type='lianxiren']/contact_email"/>"/>
        <td align="right"><span class="color_red">*</span>联系人手机：</td>
        <td colspan="2">
            <input type="text" label="联系人手机" name="proposal/contact_psn_mobile" onfocus="InitInput.setNumber(this,11,0,0);" class="input_css required mobile" maxlength="50" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />">
        </td>
    </tr>

    <tr class="li_1">
        <td align="right"><span class="color_red">*</span>本项目是否涉及人类遗传资源采集、保藏、利用、对外提供相关活动（必填项）：</td>
        <td colspan="3" align="center" >
            <c:set var="involve_value"><x:out select="$xmlData/data/proposal/involve_value" /></c:set>
            <cpt:checkbox key="involve" name="involve"  width="70px"  repeatColumn="4" value="${involve_value }"  onClick="involve" tagType="radio" ></cpt:checkbox>
            <input type="hidden" id="involve_value" name="proposal/involve_value" class="required" value="${involve_value}" label="本项目是否涉及人类遗传资源采集、保藏、利用、对外提供相关活动">
            <input type="hidden" name="proposal/involve_name" value="<x:out select="$xmlData/data/proposal/involve_name" />">

            <div id="related_activities_value_div" style="display: none"  >
                <c:set var="related_activities_value"><x:out select="$xmlData/data/proposal/related_activities_value" /></c:set>
                <cpt:checkbox key="related_activities" name="related_activities"  width="70px"  repeatColumn="4" value="${related_activities_value }" ></cpt:checkbox>
                <input type="hidden" id="related_activities_value" name="proposal/related_activities_value" class="required" value="${related_activities_value}" label="本项目是否涉及人类遗传资源采集、保藏、利用、对外提供相关活动-->涉及选项">
                <input type="hidden" name="proposal/related_activities_name"  value="<x:out select="$xmlData/data/proposal/related_activities_name" />">
            </div>
        </td>
    </tr>

    <tr>
        <td align="right"><span class="color_red">*</span>是否涉及实验动物和动物实验：</td>
        <td colspan="4" align="center">
            <c:set var="experiment_animal_value"><x:out select="$xmlData/data/proposal/experiment_animal_value" /></c:set>
            <cpt:checkbox key="no_yes" name="experiment_animal"  width="70px"  repeatColumn="4" value="${experiment_animal_value }"   tagType="radio" ></cpt:checkbox>
            <input type="hidden" id="experiment_animal_value" name="proposal/experiment_animal_value" class="required" value="${experiment_animal_value}" label="是否涉及实验动物和动物实验">
            <input type="hidden" name="proposal/experiment_animal_name" value="<x:out select="$xmlData/data/proposal/experiment_animal_name" />">
        </td>
    </tr>

    <tr>

        <td align="right"><span class="color_red">*</span>项目申请金额（万元）：</td>
        <td colspan="4">
            <input type="text" name="proposal/request_money1" class="required" id="request_amount" onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
                   value="<x:out select="$xmlData/data/proposal/request_money1"/>" label="项目申请金额" onchange="synchronizationAmount();"
            >
        </td>
    </tr>
    <tr >
        <td colspan="5" align="center">
            中医药领域首席专家
        </td>
    </tr>
    <tr>
        <td align="right">姓名：</td>
        <td>
            <input  type="text" label="中医药领域首席专家-->姓名" name="medicine/expert_name" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/medicine/expert_name" />">
        </td>
        <td align="right">
            <c:set var="expert_birthday_date">
                <x:out select="$xmlData/data/medicine/expert_birthday_date"/>
            </c:set>
            出生年月：
        </td>
        <td>
            <cpt:date id="expert_birthday_date" name="medicine/expert_birthday_date"
                               value="${expert_birthday_date}" className="date" label="中医药领域首席专家-->出生年月"/>
        </td>
    </tr>
    <tr>
        <td align="right">职称：</td>
        <td>
            <c:set var="proftitlevalue1">{'id':'<x:out
                    select='$xmlData/data/proposal/expert_title_value'/>','name':'<x:out
                    select='$xmlData/data/proposal/expert_title_name'/>'}</c:set>
            <cpt:tree key="prof_title" cacheable="false" readonly="true" value="${proftitlevalue1}"
                      id="expert_title" name="expert_title" showPattern="all"
                      onClick="initTreeValueExt" shieldPattern="-1" label="中医药领域首席专家-->职称"/>
            <input type="hidden" id="expert_title_value"
                   name="proposal/expert_title_value"
                   value="<x:out select='$xmlData/data/proposal/expert_title_value' />"
                   label="中医药领域首席专家-->职称"/>
            <input type="hidden" id="expert_title_name"
                   name="proposal/expert_title_name"
                   value="<x:out select='$xmlData/data/proposal/expert_title_name' />"/>
        </td>
        <td align="right">职务：</td>
        <td>
            <input  type="text" label="中医药领域首席专家-->职务" name="medicine/expert_post" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/medicine/expert_post" />">
        </td>
    </tr>
    <tr>
        <td align="right">单位：</td>
        <td colspan="5">
            <input  type="text" label="中医药领域首席专家-->单位" name="medicine/expert_unit" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/medicine/expert_unit" />">
        </td>
    </tr>
    <tr>
        <td align="right">联系电话：</td>
        <td colspan="5">
            <input  type="text" label="中医药领域首席专家-->联系电话" name="medicine/expert_phone" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/medicine/expert_phone" />">
        </td>
    </tr>
    <tr>
        <td align="right">研究方向（限100字）：</td>
        <td colspan="4">
            <textarea name="medicine/research_direction" style="width:98%;autofocus:autofocus" label="中医药领域首席专家-->研究方向" class="input_textarea  maxlength:100"  rows=3 cols=60><x:out select="$xmlData/data/medicine/research_direction"/></textarea>
            <input type="hidden" name="medicine/research_direction_hidden" id="medicine/research_direction_hidden" value="<x:out select="$xmlData/data/medicine/research_direction_hidden" />"/>
        </td>
    </tr>
    <tr>
        <td align="right">研究成果（限100字）：</td>
        <td colspan="4">
            <textarea name="medicine/achievements" style="width:98%;autofocus:autofocus" label="中医药领域首席专家-->研究成果" class="input_textarea  maxlength:100"  rows=3 cols=60><x:out select="$xmlData/data/medicine/achievements"/></textarea>
            <input type="hidden" name="medicine/achievements_hidden" id="medicine/achievements_hidden" value="<x:out select="$xmlData/data/medicine/achievements_hidden" />"/>
        </td>
    </tr>
    <tr >
        <td colspan="5" align="center">
            现代科技领域专家
        </td>
    </tr>
    <tr>
        <td align="right">姓名：</td>
        <td>
            <input  type="text" label="现代科技领域专家-->姓名" name="tech/expert_name" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/tech/expert_name" />">
        </td>
        <td align="right">出生年月：</td>
        <td>
            <c:set var="expert_bir_date">
                <x:out select="$xmlData/data/tech/expert_bir_date"/>
            </c:set>
            <cpt:date id="expert_bir_date" name="tech/expert_bir_date"
                               value="${expert_bir_date}" className="date" label="现代科技领域专家-->出生年月"/>
        </td>
    </tr>
    <tr>
        <td align="right">职称：</td>
        <td>
            <c:set var="proftitlevalue1">{'id':'<x:out
                    select='$xmlData/data/proposal/zyy_title_value'/>','name':'<x:out
                    select='$xmlData/data/proposal/zyy_title_name'/>'}</c:set>
            <cpt:tree key="prof_title" cacheable="false" readonly="true" value="${proftitlevalue1}"
                      id="zyy_title" name="zyy_title" showPattern="all"
                      onClick="initTreeValueExt" shieldPattern="-1" label="现代科技领域专家-->职称"/>
            <input type="hidden" id="zyy_title_value"
                   name="proposal/zyy_title_value"
                   value="<x:out select='$xmlData/data/proposal/zyy_title_value' />"
                   label="现代科技领域专家-->职称"/>
            <input type="hidden" id="zyy_title_name"
                   name="proposal/zyy_title_name"
                   value="<x:out select='$xmlData/data/proposal/zyy_title_name' />"/>
        </td>
        <td align="right">职务：</td>
        <td>
            <input  type="text" label="现代科技领域专家-->职务" name="tech/psn_post" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/tech/psn_post" />">
        </td>
    </tr>
    <tr>
        <td align="right">单位：</td>
        <td colspan="5">
            <input  type="text" label="现代科技领域专家-->单位" name="tech/expert_unit" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/tech/expert_unit" />">
        </td>
    </tr>
    <tr>
        <td align="right">联系电话：</td>
        <td colspan="5">
            <input  type="text" label="现代科技领域专家-->联系电话" name="tech/expert_phone" class="input_css" maxlength="50" value="<x:out select="$xmlData/data/tech/expert_phone" />">
        </td>
    </tr>
    <tr>
        <td align="right">研究方向（限100字）：</td>
        <td colspan="4">
            <textarea name="tech/research_direction" style="width:98%;autofocus:autofocus" label="现代科技领域专家-->研究方向" class="input_textarea  maxlength:100"  rows=3 cols=60><x:out select="$xmlData/data/tech/research_direction"/></textarea>
            <input type="hidden" name="tech/research_direction_hidden" id="tech/research_direction_hidden" value="<x:out select="$xmlData/data/tech/research_direction_hidden" />"/>
        </td>
    </tr>
    <tr>
        <td align="right">研究成果（限100字）：</td>
        <td colspan="4">
            <textarea name="tech/achievements" style="width:98%;autofocus:autofocus" label="现代科技领域专家-->研究成果" class="input_textarea  maxlength:100"  rows=3 cols=60><x:out select="$xmlData/data/tech/achievements"/></textarea>
            <input type="hidden" name="tech/achievements_hidden" id="tech/achievements_hidden" value="<x:out select="$xmlData/data/tech/achievements_hidden" />"/>
        </td>
    </tr>
    <input type="hidden" id="age" name="proposal/attach_age" value="<x:out select="$xmlData/data/proposal/attach_age" />"/>

</table>
<input type="hidden" id="if_have_org" name="proposal/if_have_org">

<script type="text/javascript">
    $(function(){
        emerging_enterprises();
        $("#tab1").click();
        $("#fragment-tab1 :text,#fragment-tab1 [type='date']").addClass("input_width");
        $("#fragment-tab1 select").addClass("select_width");
        $("table.t_css").each(function(){
            $(this).find("tr").not(".cbTable tr").filter(":even").addClass("li_1");
            $(this).find("tr").not(".cbTable tr").filter(":odd").addClass("li_2");
        });
    });

    $(document).ready (function() {
        compare_age();
        getLen();
        involve();
        // emerging_enterprises();
    });
    /*function initTreeValueExt(treeId, treeNode) {
        if ((treeNode && treeNode.isParent)) {
            scmWarn("请选择具体的" + $("#" + treeId).attr("label"));
            $("#" + treeId).val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
            return false;
        }
        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            str = obj.name + "-" + str;
            obj = obj.parentNode;
        }

        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
    }*/
    function tree(){
        // var prof_title_value=$("#prof_title_value").val();
        var prof_title_name=$("#prof_title_name").val();
        // var str ="{'id':'"+prof_title_value+"','name':'"+prof_title_name+"'}";
        $("#prof_title").val(prof_title_name);

        var subject_name=$("#subject_name").val();
        // var str ="{'id':'"+prof_title_value+"','name':'"+prof_title_name+"'}";
        $("#subject").val(subject_name);


        var discipline_name=$("#discipline_name").val();
        // var str ="{'id':'"+prof_title_value+"','name':'"+prof_title_name+"'}";
        $("#discipline").val(discipline_name);

    }


    function initTreeValueExt(treeId, treeNode) {
        if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
            if (treeNode.level == 0) {
                $("#" + treeId).val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
            }

            return false;
        }


        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            obj = obj.parentNode;
        }

        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);
    }

    /**
     *申报人年龄大于57岁，第五个附件为必传
     * @Author huangxiongwei
     * @Date 2019/8/23 15:59
     * @Version V1.0
     */
    function compare_age() {
        var end_date = ${statYear}+"-01"+"-01";
        var birthday_date = $("#fzbirthday_date").val();

        var end_date_year = Number(end_date.substring(0,4));
        var birthday_date_year = Number(birthday_date.substring(0,4));

        var end_date_month = Number(end_date.substring(5,7));
        var birthday_date_month = Number(birthday_date.substring(5,7));

        var end_date_day = Number(end_date.substring(8));
        var birthday_date_day = Number(birthday_date.substring(8));

        var different_value = end_date_year - birthday_date_year -57;
        var different_value1 = end_date_month - birthday_date_month;
        var different_value2 = end_date_day - birthday_date_day;

        if(different_value > 0 || (different_value == 0 && different_value1 > 0 )  || (different_value == 0 && different_value1 == 0  && different_value2 > 0)){
            $("#age").val(1);
        }else {
            $("#age").val(0);
        }
        /*onchangeType2();*/

    }

    function involve() {
        var involve_value = $("#involve_value").val();
        if (involve_value == '0') {
            $("#related_activities_value_div").attr("style","display:block");
            $("#related_activities_value").addClass("required");
        } else{
            $("#related_activities_value_div").attr("style","display:none");
            $("input[name='proposal/related_activities_value']").val('');
            $("input[name='proposal/related_activities_name']").val('');
            $("#checkbox_dyn_related_activities").find("td input[type='checkbox']").attr("checked",false);
            $("#related_activities_value").removeClass("required");
        }
    }

    function onchangeType2(){
        var age = $("#age").val();
        if(age =='1'){
            $("#prpContent_upload tr").each(function(){
                var attachName = $(this).find("td:eq(1) span[name$='name']").text();
                if(attachName=="申报人超过57周岁，申报单位需出具其能完成项目实施的承诺函（如返聘、延迟退休等）"){
                    $(this).find("td:eq(2) span[name$='berif']").text("是");
                }
            });
        }else{
            $("#prpContent_upload tr").each(function(){
                var attachName = $(this).find("td:eq(1) span[name$='name']").text();
                if(attachName=="申报人超过57周岁，申报单位需出具其能完成项目实施的承诺函（如返聘、延迟退休等）"){
                    $(this).find("td:eq(2) span[name$='berif']").text("否");
                }

            });
        }

    }

    $(document).ready(function(){
        if($('input:checkbox[name="enterprise_scale"]:checked').val()=="中小企业"){
            $("#technologyEnterprise").removeAttr("disabled");
        }else{
            $("#technologyEnterprise").attr("disabled",true);
        }
    });

    /***
     * 勾选中小型企业框时打开科技型中小企业选择
     * 没有勾选时关闭科技型中小企业选择，并清除隐藏域的值
     *
     */
    function removeDisabled(){
        if($('input:checkbox[name="enterprise_scale"]:checked').val()=="中小企业"){
            $("#technologyEnterprise").removeAttr("disabled");
        }else{
            $("#technologyEnterprise").removeAttr("checked");
            $("#technology_enterprise_value").val("");
            $("#technologyEnterprise").attr("disabled",true);
        }
    };


    function synchronizationAmount(){
        var request_amount=$("#request_amount").val();
        if(request_amount !=  ""){
            $("#total_each_0").val(parseFloat($("#request_amount").val()).toFixed(2));

            countFundAuto('total_','each_0,each_1,each_2,each_4','investfrom_5');
        }else if(request_amount ==  ""){
            $("#total_each_0").val("");
            countFundAuto('total_','each_0,each_1,each_2,each_4','investfrom_5');
        }

    }

    $(function() {
        $("#inland tr:even").addClass("li_1");
        $("#inland tr:odd").addClass("li_2");
    });


    function change_cs(){
        $("#inland tr:even").removeClass().addClass("li_1");
        $("#inland tr:odd").removeClass().addClass("li_2");
    }

    function initSubjectTreeValueExp(treeId, treeNode) {
        /* if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            // scmWarn($("#" + treeId).attr("label") + "不能选择第一级，请选择它的子级！");
             if (treeNode.level == null) {
                 $("#" + treeId).val("");
                 $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val("");
                 $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val("");
             }
             return false;
         }*/
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(treeNode.name.substring(treeNode.name.indexOf(".") + 1));
        //触发研究方向
        //checkDisCodeExp(treeNode.id,treeId,true); //下拉树
        //checkDisCodeSelect(treeNode.id,treeId,true);
    }

    /*function fund_compare() {
        var total_each =  (Number($("#total_each_0").val())*100 + Number($("#total_each_1").val())*100 + Number($("#total_each_2").val())*100+ Number($("#total_each_3").val())+ Number($("#total_each_4").val())*100)/100;
        $("#total_investfrom_5").val(total_each);
    }*/
    function synchronizationAmount1(){
        var built_institute=$("#built_institute").val();
        if(built_institute !=  ""){
            $("span[id='built_institute_[00]']").html($("#built_institute").val());
            /*$("#total_fund_18").val(parseFloat($("#request_amount").val()).toFixed(2));*/
        }else if(built_institute ==  ""){
            $("span[id='built_institute_[00]']").html("");
        }
    }

    function getLen() {
        var len=$("#inland tr:gt(1)").length;
        if(len>0){
            $("#if_have_org").val("1");
        }else{
            $("#if_have_org").val("0");
        }
    }

    function emerging_industries() {
        var emerging_industries_value = $("#emerging_industries_value").val();
        if(emerging_industries_value==0){
            $("#emerging_industries").val(1);
        }else if(emerging_industries_value==1){
            $("#emerging_industries").val(0);
        }else {
            $("#emerging_industries").val("");
        }
    }


    function emerging_enterprises() {
        var emerging_enterprises_value = $("#emerging_enterprises_value").val();
        if (emerging_enterprises_value == "0") {
            $("#emerging_industries_value_div").attr("style","display:block");
            $("#emerging_industries_value").addClass("required");
        } else{
            $("#emerging_industries_value_div").attr("style","display:none");
            $("input[name='proposal/emerging_industries_value']").val('');
            $("input[name='proposal/emerging_industries_name']").val('');
            $("#checkbox_dyn_emerging_industries").find("td input[type='checkbox']").attr("checked",false);
            $("#emerging_industries_value").removeClass("required");
        }
    }

    function initTreeValueExt2(treeId, treeNode) {

        if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
            scmWarn($("#" + treeId).attr("label") + messageTip.researchAreaInvalidDisciplineCode);
            if (treeNode.level == 0) {
                $("#" + treeId).val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
                $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
            }

            return false;
        }


        var str = treeNode.name;
        var obj = treeNode.parentNode;
        while (obj != null) {
            obj = obj.parentNode;
        }

        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val(str);

    }


</script>
